package cn.beyond.vehicleManagement.service;

import cn.beyond.vehicleManagement.dao.VehicleDao;
import cn.beyond.vehicleManagement.pojo.Vehicles;
import cn.beyond.vehicleManagement.util.DataBaseUtil;

import java.util.List;
import java.util.Map;

public class VehicleService {

    VehicleDao dao=new VehicleDao();

    /**
     * 添加车辆
     * @return
     */
    public int addVehicle(Vehicles vehicles){
        return dao.addVehicle(vehicles);
    }

    /**
     * 删除车辆
     * @param obj
     * @return
     */
    public int deleteVehicle(Object obj,String column){
        return dao.deleteVehicle(obj,column);

    }

    /**
     * 修改车辆信息
     * @return
     */
    public int update(Vehicles vehicles){
        return  dao.update(vehicles);
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public Vehicles selectUserByOne(Vehicles vehicles, Map<String, Object> selectmap){
        return dao.selectUserByOne(vehicles,selectmap);
    }

    /**
     * 查询结果返回多条记录
     * @param selectmap
     * @return
     */
    public List<Vehicles> selectUserByCondition(Vehicles vehicles, Map<String, Object> selectmap){
        return  dao.selectUserByCondition(vehicles,selectmap);
    }
}
